﻿using ReferToFriend.Dapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ReferToFriend.Reponsitory
{
    public class InMemoryRepository
    {
        public static List<ReferFriend> ReferFriends;
        static InMemoryRepository()
        {
            if (ReferFriends == null || ReferFriends.Count == 0)
            {
                var _sqlReponsitory = new SqlRepository();
                ReferFriends = _sqlReponsitory.GetAll();
            }
        }

        public bool AddRecord(ReferFriend record)
        {
            ReferFriends.Add(record);
            return true;
        }
    }
}